package com.match.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.match.rpc.dubbo.DubboInterface;

@Controller
@RequestMapping("/index")
public class IndexController {

	@Autowired
	private DubboInterface  dubboInterface;
	public IndexController() {
	}
	@GetMapping("/index.html")
	public Object index() throws Exception{
		String str=null;
		str=dubboInterface.sayHello("德玛西亚");
		System.out.println(str);
		return "index/index";
		
	}
	@PostMapping("/index.html")
	public Object index1() {
		String str=null;
		str=dubboInterface.sayHello("德玛西亚");
		return str;
	}

}
